package cn.gok;

/**
 * @Author: LKSV
 * @Description:
 * @Date:Created in 20:21 2021/8/22
 */
public class ClientBootstrap {
    public static final String providerName = "UserService#sayHello#";

    public static void main(String[] args) throws InterruptedException {
        RpcConsumer consumer = new RpcConsumer();
        // 创建一个代理对象
        IUserService service = (IUserService)
                consumer.createProxy(IUserService.class,
                        providerName);
        for (;;) {
            Thread.sleep(1000);
            System.out.println(service.sayHello("are you ok ?"));
        }
    }
}
